package com.changcheng.project.yuminsi.enums;

/**
 * @author yuminsi
 * @description
 * @date 2020/9/18 15:20
 * @since
 */
public enum SysSourceEnum {
    /**
     *
     */
    ACCT_TYPE_0("0","运营"),
    /**
     *
     */
    ACCT_TYPE_1("1","经销商");

    private String code;
    private String name;

    SysSourceEnum() {
    }

    SysSourceEnum(String code, String name) {
        this.code = code;
        this.name = name;
    }

    public String getCode() {
        return code;
    }

    public String getName() {
        return name;
    }

    public static SysSourceEnum acctType(String code){
        for (SysSourceEnum type:values()){
            if (type.getCode().equals(code)){
                return type;
            }
        }
        return null;
    }

}
